//
//  HMTool.m
//  用于存放通用工具方法
//
//  Created by mengxiangyu on 2017/6/23.
//  Copyright © 2017年 MengXY All rights reserved.
//

#import "HMTool.h"

@implementation HMTool


#pragma mark - 判断传入参数不能为空
+ (BOOL)isNilWithParam:(id)param {
    if (!param) { return NO; }
    // 如果是字典
    if ([param isKindOfClass:[NSDictionary class]] || [param isKindOfClass:[NSArray class]] || [param isKindOfClass:[NSSet class]]) {
        
        for (id value in param) {
            if (![HMTool isNilWithParam:value]) { return NO; }
        }
        
    }
    return YES;
}
@end
